import request from '@/utils/request'

export function createClass(data) {
  return request({
    url: 'manager/class',
    method: 'post',
    data
  })
}

export function addStuToClass(id, data) {
  return request({
    url: 'manager/class/' + id + '/student',
    method: 'post',
    data
  })
}

export function deleteClass(id) {
  return request({
    url: 'manager/class/' + id,
    method: 'delete'
  })
}

export function fetchClassList(query) {
  return request({
    url: 'manager/class',
    method: 'get',
    params: query
  })
}
